import { createStore } from "vuex";

export default createStore({
    state: {
        systemNotification: {
            typeEnumeration: {
                videoCallNotification: 1,
                textNotification: 2
            },
            show: false,
            showType: undefined,
            //文本通知得内容
            content: undefined,

            //呼叫方媒体连接
            callerMediaConnection: undefined
        },
        dataConnection: {
            callerDataConnection: undefined,
            operationType: {
                typeEnumeration: {
                    callRequest: 1,
                    agreeCall: 2,
                    rejectCall: 3,
                    hangUp: 4
                }
            }
        },
        videoCall: {
            activated: false,
            localPeer: undefined,
            peerIds: [],
            callerMediaConnection: undefined,
            typeEnumeration: {
                call: 1,
                answer: 2
            }
        },
        webSocket: {
            webSocketConnection: undefined,
            message: {
                typeEnumeration: {
                    registerPeer: 1,
                    logOffPeer: 2,
                    refreshPeerIds: 3
                }
            }
        }
    }
});